/**
 * @Title: settle_router.js
 * @Description: 结算指标router
 * Copyright: Copyright (c) 2014 
 * Company:中国平安
 *
 * @Project HIMS-FWA
 * @author QIANDUO875
 * @date 2014年9月25日 下午2:01:05
 * @version V1.0
 */
;
(function(){
	'use strict';
	
	var app = angular.module('mhis.configs');
	app.config(['BaseURL','Config', function(baseUrl,Config){
		
		var states = Config.states;
		    
		states.push({
			name:'warning',
	        url:'/warning',
	        data:{
	        	title:'费用预警',
	        	tabRoot:'warning'
	        },
	        deepStateRedirect: true,
	        sticky: true,
	        views:{
	            'warning@':{
	            	template:'<div ui-view class="full-height full-width"></div>',
	            	controller:function() {
	            	}
	            }
	        }
		   });
	        /**
	         * 预警管理-费用预警
	         */
	        states.push({
				name:'warning.warningList',
		        url:'/warningList',
		        data:{
		        	title:'费用预警',
		        	tabRoot:'warning'
		        },
//		        deepStateRedirect: true,
//		        sticky: true,
		        views:{
		            'warning@':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warning_view.html',
		            	controller:'WarningCtrl'
		            }
		        }
			});
	        /**
	         * 预警管理-查看预警事件
	         */
	        states.push({
				name:'warning.warningView',
		        url:'/warningView/:warnNo',
		        data:{
		        	title:'新增预警事件',
		        	tabRoot:'warning'
		        },
		        deepStateRedirect: true,
		        sticky: true,
		        views:{
		            '@warning':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningViewWarn_view.html',
		            	controller:'WarningViewCtrl'
		            }
		        }
			});
	        /**
	         * 医院自查反馈 
	         */
	        states.push({
				name:'selfFeedback',
		        url:'/selfFeedback',
		        data:{
		        	title:'预警结果处理',
		        	tabRoot:'selfFeedback'
		        },
		        deepStateRedirect: true,
		        sticky: true,
		        views:{
		            'selfFeedback@':{
		            	template: '<div class="full-width full-height" ui-view></div>',
		            	controller:function($state){
		            		if ($state.current.name =='selfFeedback') {
		            			$state.go("selfFeedback.selfFeedbackList");
		            		}
		            	}
		            }
		        }
			});
	        
	        /**
	         * 医院自查反馈 列表
	         */
	    	states.push({
				name:'selfFeedback.selfFeedbackList',
		        url:'/selfFeedbackList',
		        data:{
		        	title:'预警结果处理',
		        	tabRoot:'selfFeedback'
		        },
		        views:{
		            '@selfFeedback':{
		            	templateUrl: baseUrl + 'views/hcpms/warning/self/selfFeedback_view.html',
		            	controller:'SelfFeedbackCtrl'
		            }
		        }
			});
	        
	        /**
	         * 医院自查反馈 编辑
	         */
	    	states.push({
				name:'selfFeedback.selfFeedbackEdit',
		        url:'/selfFeedbackEdit/{warnNo}',
		        data:{
		        	title:'医院自查信息',
		        	tabRoot:'selfFeedback'
		        },
		        views:{
		            '@selfFeedback':{
		            	templateUrl: baseUrl + 'views/hcpms/warning/self/selfFeedback_edit_view.html',
		            	controller:'SelfFeedbackEditCtrl'
		            }
		        }
			});
	    	
	    	 /**
	         * 医院自查反馈 查看明细
	         */
	    	states.push({
				name:'selfFeedback.selfFeedbackDetail',
		        url:'/selfFeedbackDetail/{warnNo}',
		        data:{
		        	title:'医院自查信息',
		        	tabRoot:'selfFeedback'
		        },
		        views:{
		            '@selfFeedback':{
		            	templateUrl: baseUrl + 'views/hcpms/warning/self/selfFeedback_detail_view.html',
		            	controller:'SelfFeedbackDetailCtrl'
		            }
		        }
			 });       
	        /**
	         * 预警登记 列表
	         */
	        states.push({
				name:'warnQueryAdd',
	            url:'/warnQueryAdd',
	            data:{
	            	title:'预警登记',
	            	tabRoot:'warnQueryAdd'
	            },
	            deepStateRedirect: true,
	            sticky: true,
	            views:{
	                'warnQueryAdd@':{
	                	template:'<div class="full-width full-height" ui-view></div>',
	                    controller:function($state){
	                    	if ($state.current.name =='warnQueryAdd') {
	                    		$state.go('warnQueryAdd.warningAddList');
	                    	}
	                    }
	                }
	            }
			});
	        states.push({
				name:'warnQueryAdd.warningAddList',
	            url:'/warningAddList',
	            data:{
	            	title:'预警登记',
	            	tabRoot:'warnQueryAdd'
	            },
	            views:{
	                '@warnQueryAdd':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warnQuery/warningAddList_view.html',
	                    controller:'WarningAddListCtrl'
	                }
	            }
			});
	        /**
	         * 预警管理-新增预警事件
	         */
	        states.push({
				name:'warnQueryAdd.warningAdd',
		        url:'/warningAdd',
		        data:{
		        	title:'预警新增',
		        	tabRoot:'warnQueryAdd'
		        },
		        views:{
		            '@warnQueryAdd':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningAdd_view.html',
		            	controller:'WarningAddCtrl'
		            }
		        }
			});
	        /**
	         * 预警管理-修改预警事件
	         */
	        states.push({
				name:'warnQueryAdd.warningEdit',
		        url:'/warningEdit/:warnNo/:urlFlag',
		        data:{
		        	title:'预警修改',
		        	tabRoot:'warnQueryAdd'
		        },
		        views:{
		        	'@warnQueryAdd':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningAdd_view.html',
		            	controller:'WarningAddCtrl'
		            }
		        }
			});
	        /**
	         * 预警登记-查看预警事件
	         */
	        states.push({
				name:'warnQueryAdd.warningView',
		        url:'/warningView/:warnNo/:actNo/:isBack',
		        data:{
		        	title:'预警查看',
		        	tabRoot:'warnQueryAdd'
		        },
		        views:{
		        	'@warnQueryAdd':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningViewBack_view.html',
		            	controller:'WarningViewBackCtrl'
		            }
		        }
			});
	        /**
	         * 预警筛查 列表
	         */
	        states.push({
				name:'warnQueryScreen',
	            url:'/warnQueryScreen',
	            data:{
	            	title:'预警筛查',
	            	tabRoot:'warnQueryScreen'
	            },
	            deepStateRedirect: true,
	            sticky: true,
	            views:{
	                'warnQueryScreen@':{
	                	template:'<div class="full-width full-height" ui-view></div>',
	                    controller:function($state){
	                    	if ($state.current.name =='warnQueryScreen') {
	                    		$state.go('warnQueryScreen.warningScreenList');
	                    	}
	                    }
	                }
	            }
			});
	        states.push({
				name:'warnQueryScreen.warningScreenList',
	            url:'/warningScreenList',
	            data:{
	            	title:'预警筛查',
	            	tabRoot:'warnQueryScreen'
	            },
	            views:{
	                '@warnQueryScreen':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warnQuery/warningScreenList_view.html',
	                    controller:'WarningScreenListCtrl'
	                }
	            }
			});
	        /**
	         * 预警筛查 预警事件确认以及修改内容
	         */
	        states.push({
				name:'warnQueryScreen.warningScreenEdit',
	            url:'/warningScreenEdit/:warnNo/:urlFlag',
	            data:{
	            	title:'预警筛查',
	            	tabRoot:'warnQueryScreen'
	            },
	            views:{
	                '@warnQueryScreen':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warningScreenEdit_view.html',
	                    controller:'WarningScreenEditCtrl'
	                }
	            }
			});
	        /**
	         * 预警筛查-查看预警事件
	         */
	        states.push({
				name:'warnQueryScreen.warningView',
		        url:'/warningView/:warnNo/:actNo/:isBack',
		        data:{
		        	title:'预警查看',
		        	tabRoot:'warnQueryScreen'
		        },
		        views:{
		        	'@warnQueryScreen':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningViewBack_view.html',
		            	controller:'WarningViewBackCtrl'
		            }
		        }
			});
	        /**
	         * 预警审核 列表
	         */
	        states.push({
				name:'warnQueryAudit',
	            url:'/warnQueryAudit',
	            data:{
	            	title:'预警审核',
	            	tabRoot:'warnQueryAudit'
	            },
	            deepStateRedirect: true,
	            sticky: true,
	            views:{
	                'warnQueryAudit@':{
	                	template:'<div class="full-width full-height" ui-view></div>',
	                    controller:function($state){
	                    	if ($state.current.name =='warnQueryAudit') {
	                    		$state.go('warnQueryAudit.warningAuditList');
	                    	}
	                    }
	                }
	            }
			});
	        states.push({
				name:'warnQueryAudit.warningAuditList',
	            url:'/warningAuditList',
	            data:{
	            	title:'预警审核',
	            	tabRoot:'warnQueryAudit'
	            },
	            views:{
	                '@warnQueryAudit':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warnQuery/warningAuditList_view.html',
	                    controller:'WarningAuditListCtrl'
	                }
	            }
			});
	        /**
	         * 预警审核处理
	         */
	        states.push({
				name:'warnQueryAudit.warningAuditWarn',
	            url:'/warningAuditWarn/:warnNo/:urlFlag',
	            data:{
	            	title:'预警审核',
	            	tabRoot:'warnQueryAudit'
	            },
	            views:{
	                '@warnQueryAudit':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warningAuditWarn_view.html',
	                    controller:'WarningAuditWarnCtrl'
	                }
	            }
			});
	        /**
	         * 预警审核-查看预警事件
	         */
	        states.push({
				name:'warnQueryAudit.warningView',
		        url:'/warningView/:warnNo/:actNo/:isBack',
		        data:{
		        	title:'预警查看',
		        	tabRoot:'warnQueryAudit'
		        },
		        views:{
		        	'@warnQueryAudit':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningViewBack_view.html',
		            	controller:'WarningViewBackCtrl'
		            }
		        }
			});
	        /**
	         * 预警反馈评估 列表
	         */
	        states.push({
				name:'warnQueryAssess',
	            url:'/warnQueryAssess',
	            data:{
	            	title:'反馈评估',
	            	tabRoot:'warnQueryAssess'
	            },
	            deepStateRedirect: true,
	            sticky: true,
	            views:{
	                'warnQueryAssess@':{
	                	template:'<div class="full-width full-height" ui-view></div>',
	                    controller:function($state){
	                    	if ($state.current.name =='warnQueryAssess') {
	                    		$state.go('warnQueryAssess.warningAssessList');
	                    	}
	                    }
	                }
	            }
			});
	        states.push({
				name:'warnQueryAssess.warningAssessList',
	            url:'/warningAssessList',
	            data:{
	            	title:'反馈评估',
	            	tabRoot:'warnQueryAssess'
	            },
	            views:{
	                '@warnQueryAssess':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warnQuery/warningAssessList_view.html',
	                    controller:'WarningAssessListCtrl'
	                }
	            }
			});
	        /**
	         * 反馈评估处理
	         */
	        states.push({
				name:'warnQueryAssess.warningAssessWarn',
	            url:'/warningAssessWarn/:warnNo/:urlFlag',
	            data:{
	            	title:'反馈评估',
	            	tabRoot:'warnQueryAssess'
	            },
	            views:{
	                '@warnQueryAssess':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warningAssessWarn_view.html',
	                    controller:'WarningAssessWarnCtrl'
	                }
	            }
			});
	        /**
	         * 预警结论评估-查看预警事件
	         */
	        states.push({
				name:'warnQueryAssess.warningView',
		        url:'/warningView/:warnNo/:actNo/:isBack',
		        data:{
		        	title:'预警查看',
		        	tabRoot:'warnQueryAssess'
		        },
		        views:{
		        	'@warnQueryAssess':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningViewBack_view.html',
		            	controller:'WarningViewBackCtrl'
		            }
		        }
			});
	        /**
	         * 预警结论审核 列表
	         */
	        states.push({
				name:'warnQueryResultAudit',
	            url:'/warnQueryResultAudit',
	            data:{
	            	title:'结论审核',
	            	tabRoot:'warnQueryResultAudit'
	            },
	            deepStateRedirect: true,
	            sticky: true,
	            views:{
	                'warnQueryResultAudit@':{
	                	template:'<div class="full-width full-height" ui-view></div>',
	                    controller:function($state){
	                    	if ($state.current.name =='warnQueryResultAudit') {
	                    		$state.go('warnQueryResultAudit.warningResultAuditList');
	                    	}
	                    }
	                }
	            }
			});
	        states.push({
				name:'warnQueryResultAudit.warningResultAuditList',
	            url:'/warningResultAuditList',
	            data:{
	            	title:'结论审核',
	            	tabRoot:'warnQueryResultAudit'
	            },
	            views:{
	                '@warnQueryResultAudit':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warnQuery/warningResultAuditList_view.html',
	                    controller:'WarningResultAuditListCtrl'
	                }
	            }
			});
	        /**
	         * 预警结论审核处理
	         */
	        states.push({
				name:'warnQueryResultAudit.warningResultAudit',
	            url:'/warningResultAudit/:warnNo/:urlFlag',
	            data:{
	            	title:'结论审核',
	            	tabRoot:'warnQueryResultAudit'
	            },
	            views:{
	                '@warnQueryResultAudit':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warningResultAudit_view.html',
	                    controller:'WarningResultAuditCtrl'
	                }
	            }
			});
	        /**
	         * 预警结论审核-查看预警事件
	         */
	        states.push({
				name:'warnQueryResultAudit.warningView',
		        url:'/warningView/:warnNo/:actNo/:isBack',
		        data:{
		        	title:'预警查看',
		        	tabRoot:'warnQueryResultAudit'
		        },
		        views:{
		        	'@warnQueryResultAudit':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningViewBack_view.html',
		            	controller:'WarningViewBackCtrl'
		            }
		        }
			});

	        /**
	         * 预警审批 列表
	         */
	        states.push({
				name:'warnQueryApprove',
	            url:'/warnQueryApprove',
	            data:{
	            	title:'预警审批',
	            	tabRoot:'warnQueryApprove'
	            },
	            deepStateRedirect: true,
	            sticky: true,
	            views:{
	                'warnQueryApprove@':{
	                	template:'<div class="full-width full-height" ui-view></div>',
	                    controller:function($state){
	                    	if ($state.current.name =='warnQueryApprove') {
	                    		$state.go('warnQueryApprove.warningApproveList');
	                    	}
	                    }
	                }
	            }
			});
	        states.push({
				name:'warnQueryApprove.warningApproveList',
	            url:'/warningApproveList',
	            data:{
	            	title:'预警审批',
	            	tabRoot:'warnQueryApprove'
	            },
	            views:{
	                '@warnQueryApprove':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warnQuery/warningApproveList_view.html',
	                    controller:'WarningApproveListCtrl'
	                }
	            }
			});
	        
	        /**
	         * 预警审批处理
	         */
	        states.push({
				name:'warnQueryApprove.warningApproveWarn',
	            url:'/warningApproveWarn/:warnNo/:urlFlag',
	            data:{
	            	title:'预警审批',
	            	tabRoot:'warnQueryApprove'
	            },
	            views:{
	                '@warnQueryApprove':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warningApproveAudit_view.html',
	                    controller:'WarningApproveAuditCtrl'
	                }
	            }
			});
	        /**
	         * 预警审批-查看预警事件
	         */
	        states.push({
				name:'warnQueryApprove.warningView',
		        url:'/warningView/:warnNo/:actNo/:isBack',
		        data:{
		        	title:'预警查看',
		        	tabRoot:'warnQueryApprove'
		        },
		        views:{
		        	'@warnQueryApprove':{
		            	templateUrl:baseUrl+'views/hcpms/warning/warningViewBack_view.html',
		            	controller:'WarningViewBackCtrl'
		            }
		        }
			});

	        /**
	         * 预警查询 列表
	         */
	        states.push({
				name:'warnQuery',
	            url:'/warnQuery',
	            data:{
	            	title:'预警查询',
	            	tabRoot:'warnQuery'
	            },
	            deepStateRedirect: true,
	            sticky: true,
	            views:{
	                'warnQuery@':{
	                	template:'<div class="full-width full-height" ui-view></div>',
	                    controller:function($state){
	                    	if ($state.current.name =='warnQuery') {
	                    		$state.go('warnQuery.warningQueryList');
	                    	}
	                    }
	                }
	            }
			});
	        states.push({
				name:'warnQuery.warningQueryList',
	            url:'/warningQueryList',
	            data:{
	            	title:'预警查询',
	            	tabRoot:'warnQuery'
	            },
	            views:{
	                '@warnQuery':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warnQuery/warningQueryList_view.html',
	                    controller:'WarningQueryListCtrl'
	                }
	            }
			});
	        
	        /**
	         * 预警查看
	         */
	        
	        states.push({
				name:'warnQuery.warningViewWarn',
	            url:'/warningViewWarn/:warnNo/:actNo/:processNo',	            
	            data:{
	            	title:'预警查询',
	            	tabRoot:'warnQuery'
	            },
	            views:{
	                '@warnQuery':{
	                	templateUrl:baseUrl+'views/hcpms/warning/warningViewWarn_view.html',
	                    controller:'WarningViewWarnCtrl'
	                }
	            }
			});	        
	}]);
	
})();